/*******************************************************************************
 * Copyright (c) 2007 University of Oslo.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     University of Oslo - initial API and implementation
 *******************************************************************************/

package com.cea.papyrus.diagram.sequence.sedi.model.command.diagram;

import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.commands.Command;

/**
 * TODO Document
 * 
 * @author frankd@ifi.uio.no
 */
public class SetBoundsHintCommand extends Command {
	private Rectangle hint;

	public void setHint(final Rectangle hint) {
		this.hint = hint;
	}

	@Override
	public void execute() {
		HintRegister.setHint("bounds", hint);
	}

	@Override
	public void undo() {
		HintRegister.removeHint("bounds");
	}

	@Override
	public void redo() {
		execute();
	}

	@Override
	public void dispose() {
		hint = null;
	}
}
